package kr.hkit.powerjava.chapter06;

import java.util.Scanner;

public class DoWhileEx1 {
	public static void main(String[] args) {
		int answer = 59;
		int guess;
		int tries = 0;
		Scanner in = new Scanner(System.in);

		do {
			System.out.println("정답을 추측하여 보시오: ");
			guess = in.nextInt();
			tries++;

			if (guess > answer)
				System.out.println("제시한 정수가 높습니다.");
			if (guess < answer)
				System.out.println("제시한 정수가 낮습니다");

		} while (guess != answer);

	}

}
